package com.liugan.magic.actor.still;

import com.liugan.magic.actor.base.BaseActor;
import com.liugan.magic.screen.PointXY;
import com.liugan.magic.screen.layer.GameLayer;

public class Grass extends BaseActor{
	
	public Grass(PointXY totalXY,PointXY offsetXY,String end){
		this.totalXY.setxy(totalXY);
		this.offsetXY.setxy(offsetXY);
		//this.setAlpha(0.6f);
		if ("end".equals(end)){
			ct.rectboxheight=60;
			ct.rectboxwidth=608;
		}else{
			ct.rectboxheight=60;
			ct.rectboxwidth=592;
		}
		ct.setCT("grass", 0,  14, 0, 0, 0,0,0);//设定属性
	}
	@Override
	public void action(long elapsedTime) {
		if (layer==null){
			layer =(GameLayer)this.getLayer();
		}
		this.setLocation(this.totalXY.x-layer.layerbeginXY.x, this.totalXY.y-layer.layerbeginXY.y);
	}
}
